package com.gitee.hongruisun.promotion.v2;
import java.util.HashMap;
import java.util.Map;

/**
 * 课程  工厂 + 单例
 */
public class NetworkCourseFactory {
    private NetworkCourseFactory(){}
    private static Map netWorkCourceMap = new HashMap();
    static {
        netWorkCourceMap.put("java",new JavaNetworkCourse());
        netWorkCourceMap.put("DigData",new DigDataNetworkCourse());
    }

    /**
     * 获取课程信息
     * @return
     */
    public static NetworkCourseTemplate getNetWorkCourse(String key){
        return (NetworkCourseTemplate) netWorkCourceMap.get(key);
    }

}
